package com.apps.sdses.flink141.test;

import java.util.LinkedList;

/**
 * @author jiwei
 * @description
 * @date 2023/8/17 15:12
 */
public class LinkedList2Array {
    public static void main(String[] args) {

        LinkedList<String> linkedList = new LinkedList<>();
        linkedList.add("banana");
        linkedList.add("apple");
        linkedList.add("cherry");

        String[] array = linkedList.toArray(new String[0]);

        for (String s : array) {
            System.out.println(s);
        }

        System.out.println(linkedList);

//        String[] fields = new String[] {};


    }
}
